package com.dev;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
public class IconViewSpread extends IconView{
    IconViewSpread(MainActivity ma){
		super(ma);
	}
	@Override
	protected void onDraw(Canvas canvas) {
		int vw=getWidth();
		int vh=getHeight();
		int cl=(vw-vh)/2;
		int paddingVer=vh/4;
		int ct=paddingVer;
		int cr=vw-paddingVer;
		int cb=vh-paddingVer;
		Paint p=new Paint();
		p.setStrokeWidth(vh/8);
		p.setStyle(Paint.Style.STROKE);
		p.setColor(0xff777777);
		//canvas.drawColor(0xff00ff00);
		if(isSelected()){
			int yy=vh/2;
			canvas.drawLine(cr,yy,cl,yy,p);
		}else{
			int xx=vw/2;
			Path path=new Path();
			path.moveTo(cr,ct);
			path.lineTo(xx,cb);
			path.lineTo(cl,ct);
			canvas.drawPath(path,p);
		}
	}
}
